<?
$randomString = random_string();

$headerClass = 'home';
if ($child == TRUE) {
    $headerClass = 'child';
}

if (!isset($pageTitle)) {
    $pageTitle = 'CreativePro Office';
} else {
    $pageTitle = $pageTitle.' : CreativePro Office';
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<META http-equiv="Content-Type" content="text/html; charset=UTF-8" />

    <title><?=$pageTitle; ?></title>
	<meta name="Description" content="CreativePro Office is a complete set of online office management tools for creative professionals. Manage your team, clients, projects, invoices, timesheets, and events from one web-based application with nothing to download or install.">
	<meta name="Keywords" content="project management, time tracking, invoices, quotes, tasks, online office, web, software, application, billable hours, creative professional, web developer, graphic artist">
	<meta name="Author" content="Jeff Denton @ UpStart Productions :: Portland OR :: info@UpStart-Productions.com">
	<META NAME="Rating" CONTENT="General">
	<META NAME="Distribution" CONTENT="global">
	<!-- Favicon -->
    <link rel="icon" href="<?=BASE_URL; ?>images/favicon.ico" type="image/x-icon" />
	<link rel="shortcut icon" href="<?=BASE_URL; ?>images/favicon.ico" type="image/x-icon" />

    <!-- Style Sheets -->
	<link rel="STYLESHEET" media="screen" href="<?=BASE_URL; ?>css/browserReset.css?<?=$randomString; ?>" type="text/css" />
    <link rel="STYLESHEET" media="screen" href="<?=BASE_URL; ?>css/stylesPublic.css?<?=$randomString; ?>" type="text/css" />
    <link rel="STYLESHEET" media="screen" href="<?=BASE_URL; ?>css/buttons.css?<?=$randomString; ?>" type="text/css" />
    <link rel="STYLESHEET" media="screen" href="<?=BASE_URL; ?>css/alerts.css?<?=$randomString; ?>" type="text/css" />

    <!--[if IE 8]>
        <link rel="STYLESHEET" media="screen" href="<?=BASE_URL; ?>css/stylesIE8.css?<?=$randomString; ?>" type="text/css" />
    <![endif]-->

    <!-- RSS Feeds -->
    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?=BASE_URL; ?>rss/Rss/productBlogFeed" />

    <!-- Print Style Sheet -->
	<link rel="STYLESHEET" media="print" href="<?=BASE_URL; ?>css/print.css?<?=$randomString; ?>" type="text/css" />

    <style type="text/css">
        #header .headerTextContainer {
            background: url('<?=BASE_URL; ?>images/<?=$headerTextImage; ?>') 0px 27px no-repeat;
        }
    </style>
	<script language="JavaScript" type="text/javascript" src="<?=BASE_URL; ?>js/swfobject.js"></script>
</head>
<body>
    <div id="header" class="<?=$headerClass; ?>">
        <div class="blackBar">
            <div class="content">
                <a href="<?=BASE_URL; ?>" class="logoCPO" title="CreativePro Office : HOME"></a>
                <div class="iconPublicBeta"></div>
                <div class="menuContainer">
                    <? if ($this->session->userdata('logged') == 1) { ?>
                        <div class="headerAvatar default">
                            <?
                            $avatarMember = $this->session->userdata('avatarMember');
                            if (empty($avatarMember)) {
                                $avatarMember = BASE_URL.'images/avatars/stockAvatar22.png';
                            }
                            ?>
                            <a href="/dashboard/Dashboard"><img class="avatar22" style="float: right;" src="<?=$avatarMember; ?>" /></a>
                            <a href="/dashboard/Dashboard">Go to your account</a> or <a href="/login/logout">Log out</a></div>
                            
                        <div style="clear: right;"></div>
                    <? } else { ?>
                        <div class="headerAvatar"><a href="/login">Login</a> or <a href="/pricing">Sign up</a></div>
                        <div style="clear: right;"></div>
                    <? } ?>                   
                    
                    <ul id="menuMain">
                        <li><a href="<?=BASE_URL; ?>" class="buttonMainMenu"><span>Home</span></a></li>
                        <li><a href="/tour" class="buttonMainMenu"><span>Tour</span></a></li>
                        <li><a href="/pricing" class="buttonMainMenu"><span>Pricing</span></a></li>
                        <!--<li><a href="/faq" class="buttonMainMenu"><span>FAQ</span></a></li>-->
                        <li><a href="http://blog.<?=SITE_DOMAIN; ?>" class="buttonMainMenu"><span>Blog</span></a></li>
                        <li><a href="http://forum.creativeprooffice.com" target="_blank" class="buttonMainMenu"><span>Forum</span></a></li>
                        <li><a href="/contact" class="buttonMainMenu"><span>Contact</span></a></li>
                    </ul>
                </div>
            </div>
        </div>
        <? if ($child == TRUE) { ?>
        <!-- Child page header field -->
        <div class="homeFieldBluePublic">
            <div class="content">
                <div class="headerTextContainer"></div>
            </div>
        </div>
        <? } else { ?>
        <!-- Home page header field -->
        <div class="homeFieldBlue">
            <div class="content">
                <div id="screenShotContainer2"></div>
                <div id="infoContainer">
                    <div class="textContainer"></div>
                    <div id="homeFieldButtonContainer">
                        <a href="/tour" class="buttonProductTour" title="Product Tour"><span>Product Tour</span></a>
                        <a href="/pricing" class="buttonSignup" title="Pricing and Signup"><span>Pricing and Signup</span></a>
                    </div>
                </div>
                <div style="clear: left;"></div>
            </div>
        </div>
        <? } ?>
    </div>
    <div id="pageBody">
